<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="../AmazeUI-2.4.2/admin/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="../AmazeUI-2.4.2/admin/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="../AmazeUI-2.4.2/admin/css/amazeui.min.css"/>
    <link rel="stylesheet" href="../AmazeUI-2.4.2/admin/css/admin.css">
    <link rel="stylesheet" href="admin.jsp">
    <script src="/js/jquery.min.js"></script>
    <script src="../AmazeUI-2.4.2/admin/js/app.js"></script>
</head>

<script>


    function dedelete(id) {
        var a= id;
        var result = confirm("是否删除？");
        if (result) {
            $.get("deleteProduct?id="+id,function(data,status){
            });

        }
    }


</script>


<body>
<div class="listbiaoti am-cf">
    <ul class="am-icon-flag on"> 商品修改删除</ul>
</div>

<form class="am-form am-g">
    <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped am-table-hover">
        <thead>
        <tr class="am-success">

            <th class="table-id">ID</th>
            <th class="table-title">商品名称</th>
            <th class="table-type">库存</th>
            <th class="table-author am-hide-sm-only">价格</th>
            <th class="table-author am-hide-sm-only">种类</th>
            <th class="table-date am-hide-sm-only">上架日期</th>
            <th width="130px" class="table-set">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${productList}" var="product">

            <tr>
                <td>${product.id}</td>
                <td><a href="#">${product.name}</a></td>
                <td>${product.store}</td>
                <td class="am-hide-sm-only">${product.price}</td>
                <td class="am-hide-sm-only">${product.classifty}</td>
                <td class="am-hide-sm-only">${product.time}</td>
                <td>
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">

                            <button
                                    onclick="window.open('/xiugaiproduct?id=${product.id}')"
                                    id="${product.id}"
                                    class="am-btn am-btn-default am-btn-xs am-text-secondary am-round update"
                                    title="修改订单"><span class="am-icon-pencil-square-o"></span>
                            </button>


                            <button
                                    onclick="dedelete(${product.id})"
                                    class="am-btn am-btn-default am-btn-xs am-text-danger am-round delete" title="删除订单"><span
                                    class="am-icon-trash-o"></span>
                            </button>
                        </div>
                    </div>
                </td>
            </tr>
        </c:forEach>

        </tbody>
    </table>


</form>


</body>
</html>